<?php

namespace App\Model;

use Illuminate\Database\Eloquent\Model;
use \Illuminate\Database\Eloquent\Relations\BelongsTo;
use App\Http\Util\TimeZoneTrait;

class DeviceOffLog extends Model
{
    use TimeZoneTrait;
    public $table = 'device_off_log';

    protected $fillable = ['sn', 'device_id'];

    public $guarded = [];

    public $casts = [
        'created_at' => 'date:Y-m-d H:i:s'
    ];

    public function device()
    {
        return $this->belongsTo(Device::class,'id','device_id');
    }
}
